package com.foreknow.view;

import com.foreknow.dao.EmpDao;
import com.foreknow.dao.GuestbookDao;
import com.foreknow.dao.impl.EmpDaoImpl;
import com.foreknow.dao.impl.GuestbookDaoImpl;
import com.foreknow.service.EmpService;
import com.foreknow.service.GuestbookService;
import com.foreknow.service.impl.EmpServiceImpl;
import com.foreknow.service.impl.GuestbookServiceImpl;

import java.sql.SQLException;

public class Test {
    public static void main(String[] args) {
        //创建业务层的对象
        GuestbookServiceImpl service = new GuestbookServiceImpl();
        //调用service中的set方法对接口进行初始化
        GuestbookDao dao = new GuestbookDaoImpl();
        service.setGuestbookDao(dao);
        service.isValidate("fender","123456");

        EmpServiceImpl empService = new EmpServiceImpl();
        EmpDao empDao = new EmpDaoImpl();
        empService.setEmpDao(empDao);
        empService.getQueryAll();


    }
}
